<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreatePartyUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('party_users', function (Blueprint $table) {
            $table->increments('id')->comment('党总支表');
            $table->string('username', 64)->nullable()->comment('党员名称');
            $table->string('avatar', 255)->nullable()->comment('党员头像');
            $table->string('identity', 64)->nullable()->comment('职位');
            $table->string('address', 255)->nullable()->comment('任职地址');
            $table->tinyInteger('status')->nullable()->comment('状态;显示1，隐藏0')->default(0);
            $table->integer('region_id')->nullable()->comment('所属地区ID（1.北洸村）')->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('party_users');
    }
}
